package imaa.escola.disciplina.domain;

import imaa.escola.instrumento.datatransfer.InstrumentoDto;
import imaa.escola.instrumento.domain.Instrumento;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ESCOLA.DISCIPLINA")
public class Disciplina {

	private Long id;
	private String descricao;
	public Instrumento instrumento;
	private Double valor;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "SEQ_DISCIPLINA")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "DSC_DISCIPLINA")
	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String desc) {
		this.descricao = desc;
	}

	@ManyToOne(targetEntity = Instrumento.class)
	@JoinColumn(name = "SEQ_INSTRUMENTO")
	public Instrumento getInstrumento() {
		return instrumento;
	}

	public void setInstrumento(Instrumento instrumento2) {
		this.instrumento = instrumento2;
	}
	@Column(name = "VALOR")
	public Double getValor() {
		return valor;
	}

	public void setValor(Double valor) {
		this.valor = valor;
	}

	

}
